<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>招聘计划</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="./css/style.css">
</head>

<body>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form  layui-form-pane">
            <div class="layui-row">
                <div class="layui-col-md3  layui-col-lg-offset2 ">
                    <div class="layui-form-item ">
                        <label for="name" class="layui-form-label">
                            投放平台
                        </label>
                        <div class="layui-input-inline">
                            <select id="department" name="department" class="valid" lay-filter="province">
                                <option value=""></option>
                                <option value="44">11</option>
                                <option value="55">44</option>
                                <option value="66">444</option>
                                <option value="77">888</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <div class="layui-form-item ">
                        <label for="name" class="layui-form-label">
                            投放平台
                        </label>
                        <div class="layui-input-inline">
                            <select id="department" name="department" class="valid" lay-filter="province">
                                <option value=""></option>
                                <option value="44">11</option>
                                <option value="55">44</option>
                                <option value="66">444</option>
                                <option value="77">888</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md2">
                    <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                </div>

            </div>

        </form>

    </div>
    <xblock>
        <button class="layui-btn" onclick="x_admin_show('添加招聘请求','./recruit-add-招聘请求弹窗.html',1100,600)"><i class="layui-icon"></i>添加招聘请求</button>
        <span class="x-right" style="line-height:40px">共有数据：88 条</span>
    </xblock>


    <table class="layui-table">
        <thead>
        <tr>
            <th>工作地点</th>
            <th>部门</th>
            <th>招聘职位</th>
            <th>招聘职位工作经验</th>
            <th>学历要求</th>
            <th>工作性质</th>
            <th>招聘人数</th>
            <th class="collate">发布时间 <img src="images/排序.png" alt=""></th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>南京（紫东）</td>
            <td>技术部</td>
            <td>前端</td>
            <td>一年以上</td>
            <td>本科</td>
            <td>全职</td>
            <td>2</td>
            <td>2017-09-12</td>
        </tr>
        <tr>
            <td>南京（紫东）</td>
            <td>技术部</td>
            <td>前端</td>
            <td>一年以上</td>
            <td>本科</td>
            <td>全职</td>
            <td>2</td>
            <td>2017-09-42</td>
        </tr>
        <tr>
            <td>南京（紫东）</td>
            <td>技术部</td>
            <td>前端</td>
            <td>一年以上</td>
            <td>本科</td>
            <td>全职</td>
            <td>2</td>
            <td>2017-09-11</td>
        </tr>
        </tbody>
    </table>
    <div class="page">
        <div>
            <a class="prev" href="">&lt;&lt;</a>
            <a class="num" href="">1</a>
            <span class="current">2</span>
            <a class="num" href="">3</a>
            <a class="num" href="">99</a>
            <a class="next" href="">&gt;&gt;</a>
        </div>
    </div>

</div>


<script type="text/javascript" src="./js/jquery-3.2.1.min.js"></script>
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<script>
    layui.use(['layer', 'form'], function () {
        var layer = layui.layer,
            form = layui.form;
        form.on('select(yx)', function (data) {
            var sec = data.value;
            var add;
            if (sec == "gj") {
                add = new Array("英国", "法国", "埃塞俄比亚", "朝鲜")
            } else if (sec == "lb") {
                add = new Array("英语", "日语", "法语", "普通话")
            }
            $("#yxdown").length = 0;
            $("#yxdown>option").remove();
            for (var i = 0; i < add.length; i++) {
                var ss = new Option();
                ss.text = add[i].split()[0];
                $("#yxdown").append(ss);
                form.render('select');
            }
        })
    })
</script>

<script>
    $(".collate>img").on("click", function () {
        makeSortable();
    })

    // 点击进行table排列
    function makeSortable(table) {
        var headers = table.getElementsByTagName("th");
        for (var i = 0; i < headers.length; i++) {
            (function (n) {
                var flag = false;
                headers[n].onclick = function () {
                    // sortrows(table,n);
                    var tbody = table.tBodies[0]; //第一个<tbody>
                    var rows = tbody.getElementsByTagName("tr"); //tbody中的所有行
                    rows = Array.prototype.slice.call(rows, 0); //真实数组中的快照

                    //基于第n个<td>元素的值对行排序
                    rows.sort(function (row1, row2) {
                        var cell1 = row1.getElementsByTagName("td")[n]; //获得第n个单元格
                        var cell2 = row2.getElementsByTagName("td")[n];
                        var val1 = cell1.textContent || cell1.innerText; //获得文本内容
                        var val2 = cell2.textContent || cell2.innerText;

                        if (val1 < val2) {
                            return -1;
                        } else if (val1 > val2) {
                            return 1;
                        } else {
                            return 0;
                        }
                    });
                    if (flag) {
                        rows.reverse();
                    }
                    //在tbody中按它们的顺序把行添加到最后
                    //这将自动把它们从当前位置移走，故没必要预先删除它们
                    //如果<tbody>还包含了除了<tr>的任何其他元素，这些节点将会悬浮到顶部位置
                    for (var i = 0; i < rows.length; i++) {
                        tbody.appendChild(rows[i]);
                    }

                    flag = !flag;
                }
            }(i));
        }
    }

    window.onload = function () {
        var table = document.getElementsByTagName("table")[0];
        makeSortable(table);
    }
</script>
<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });

    /*用户-停用*/


    /*用户-删除*/
    function member_del(obj, id) {
        var data = $(obj).parent().parent().find(".ee").html();
        console.log(data)
        layer.confirm('确认要恢复' + data + '吗？', {
            title: '确认删除'
        }, function (index) {
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已恢复!', {
                icon: 1,
                time: 1000
            });
        });
    }

    function delAll(argument) {

        var data = tableCheck.getData();

        layer.confirm('确认要恢复吗？', function (index) {
            //捉到所有被选中的，发异步进行删除
            layer.msg('恢复成功', {
                icon: 1
            });
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
    }
</script>
<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</body>

</html>